﻿using LimaLims.Application.Service.Base.Dto;
using LimaLims.Core;
using LimaLims.Core.Enum;
using LimaLims.Core.Util;

namespace LimaLims.Application.Service.Equipment.Dto
{
    /// <summary>
    /// 新增设备仪器Dto
    /// </summary>
    public class AddEquipmentInfoInput : BaseDto
    {
        /// <summary>
        /// 编号
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 仪器分类Id
        /// </summary>
        public long EquipmentCategoryId { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string Specification { get; set; }

        /// <summary>
        /// 精度
        /// </summary>
        public string Degree { get; set; }

        /// <summary>
        /// 仪器图片
        /// </summary>
        public string EquipmentImage { get; set; }

        /// <summary>
        /// 生产日期
        /// </summary>
        public DateTime? ProduceTime { get; set; }

        /// <summary>
        /// 购买日期
        /// </summary>
        public DateTime? BuyTime { get; set; }

        /// <summary>
        /// 仪器厂家Id 
        /// </summary>
        public long EquipmentFactoryId { get; set; }

        /// <summary>
        /// 所属试验站Id 
        /// </summary>
        public long ExperimentStationId { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 仪器状态Id
        /// </summary>
        public long EquipmentStatus { get; set; }
    }

    /// <summary>
    /// 编辑设备仪器Dto
    /// </summary>
    public class EditEquipmentInfoInput : AddEquipmentInfoInput
    {

    }

    /// <summary>
    /// 设备仪器列表信息
    /// </summary>
    public class EquipmentInfoOutput : BaseDto
    {
        //public long Id { get; set; }
        /// <summary>
        /// 编号
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 仪器分类Id
        /// </summary>
        public long EquipmentCategoryId { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        public string EquipmentCategoryName { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string Specification { get; set; }

        /// <summary>
        /// 精度
        /// </summary>
        public string Degree { get; set; }

        /// <summary>
        /// 仪器图片
        /// </summary>
        public string EquipmentImage { get; set; }

        /// <summary>
        /// 生产日期
        /// </summary>
        public DateTime? ProduceTime { get; set; }

        /// <summary>
        /// 购买日期
        /// </summary>
        public DateTime? BuyTime { get; set; }

        /// <summary>
        /// 仪器厂家Id 
        /// </summary>
        public long EquipmentFactoryId { get; set; }

        /// <summary>
        /// 厂家名称
        /// </summary>
        public string EquipmentFactoryName { get; set; }

        /// <summary>
        /// 所属试验站Id 
        /// </summary>
        public long ExperimentStationId { get; set; }

        /// <summary>
        /// 试验站名称
        /// </summary>
        public string ExperimentStationName { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 有效性
        /// </summary>
        public bool ValidStatus { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 仪器状态Id
        /// </summary>
        public EquipmentStatus EquipmentStatus { get; set; }

        /// <summary>
        /// 仪器状态文本
        /// </summary>
        public string EquipmentStatusText => EquipmentStatus.GetDescription();
    }

    /// <summary>
    /// 设备仪器分页
    /// </summary>
    public class EquipmentInfoPageInput : PageInputBase
    {
        /// <summary>
        /// 编号
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 仪器分类Id
        /// </summary>
        public long? CategoryId { get; set; }

        /// <summary>
        /// 仪器厂家Id 
        /// </summary>
        public long? EquipmentFactoryId { get; set; }

        /// <summary>
        /// 所属试验站Id 
        /// </summary>
        public long? ExperimentStationId { get; set; }

        /// <summary>
        /// 仪器状态Id
        /// </summary>
        public EquipmentStatus? EquipmentStatus { get; set; }

        /// <summary>
        /// 购买日期开始
        /// </summary>
        public DateTime? BuyTimeStart { get; set; }

        /// <summary>
        /// 购买日期结束
        /// </summary>
        public DateTime? BuyTimeEnd { get; set; }
    }

}
